Apple (macos)

  • Sudo
    sudo visudo
  • Stop DS_Store
    # Stop writing DS_Store files
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
  • Update Command Line Tools for Xcode
    softwareupdate --all --install --force
    
    # Uninstall 
    sudo rm -rf /Library/Developer/CommandLineTools
    
    # shows where they are installed
    sudo xcode-select -p
    ls /Library/Developer/CommandLineTools/usr/bin/
    
    sudo xcode-select --install
    
    # git failed after upgrade
    xcodebuild -runFirstLaunch
  • Fix complete nosort
    # Add this to top of /usr/local/etc/bash_completion.d/wg*
    
    [[ ${BASH_VERSINFO[0]} -ge 4 ]] || return 0
  • Fix window rearrange on sleep
    # trying to fix display 
    mac14:~ root# pmset -a powernap 0
    mac14:~ root# pmset -a tcpkeepalive 0
    # Warning: This option disables TCP Keep Alive mechanism when sytem is sleeping. This will result in some critical features like 'Find My Mac' not to function properly.
  • Find devices. Allow so to connect to my homelab
  • Directory Comparison
    opendiff d1 d2

# utils to list packages
ls /Applications
brew list
mas list # brew install mac apple store cli
pkgutil --pkgs
system_profiler SPApplicationsDataType

/usr/libexec/ApplicationFirewall/socketfilterfw --listapps
/usr/libexec/ApplicationFirewall/socketfilterfw --add  /Applications/XYZ.app

ip r get 192.168.1.127